package ckw.database.repositories;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

import ckw.database.model.Node;
import core.database.NodeType;

@Transactional
public interface NodeRepository extends JpaRepository<Node, Long> {
	Node findByNodeType(NodeType nodeType);

	List<Node> findAllByNodeType(NodeType nodeType);

	Node findByIpAndPort(String ip, String port);

	List<Node> findAllByLevel(int level);
}
